//
//  CGUrlManage.h
//  Onskysell
//
//  Created by cg on 17/3/6.
//  Copyright © 2017年 cg. All rights reserved.
//

#import <Foundation/Foundation.h>

//正式 测试环境 切换 - 注释掉就是测试环境~!!!
#define Formal_Env  YES


#define BaseAPP_URL @"http://api.gungunche.com/APPService"//用于原生app的

//#define BaseURL @"http://gungunchou.cqlj023.com/"
//#define BaseURL @"http://gungunchouapp.cqlj023.com/"
#define BaseURL [NSString stringWithFormat:@"%@/",[[NSUserDefaults standardUserDefaults] objectForKey:@"InitLk"]]//@"https://app.086023.net/"


//#define BaseWebUrl @"http://gungunchou.cqlj023.com"
//#define BaseWebUrl @"http://gungunchouapp.cqlj023.com"
#define BaseWebUrl [[NSUserDefaults standardUserDefaults] objectForKey:@"InitLk"]//@"https://app.086023.net"

//#define BaseHost @"gungunchou.cqlj023.com"
//#define BaseHost @"gungunchouapp.cqlj023.com"
#define BaseHost [[(NSString *)[[[NSUserDefaults standardUserDefaults] objectForKey:@"InitLk"] stringByReplacingOccurrencesOfString:@"https://" withString:@""] stringByReplacingOccurrencesOfString:@"http://" withString:@""] stringByReplacingOccurrencesOfString:@"/" withString:@""]//@"app.086023.net"

#ifdef Formal_Env
#define InitPageUrl @"https://api.ggwuquan.com/Home/InitPage"
#else
#define InitPageUrl @"http://api.gungunche.com/Home/InitPage"
#endif

#ifdef Formal_Env
#define DefaultLk @"https://api.ggwuquan.com"
#else
#define DefaultLk @"http://api.gungunche.com"
#endif


#define TestTag1 @"18623640504"//账号密码是123456b
#define TestTag2 @"7374ce58be384f97fb15117dd99fba3c"
#define TestUsrId   @"511"//测试用userid

#define PLACE_DEFAULT_IMG   [UIImage imageNamed:@"titleImg"]

//各个原生app跳转链接
//不模拟登陆直接的 ************************************
//购物车
#define CarList_Url_1 [NSString stringWithFormat:@"%@/ShopCart/List",DefaultLk]
//积分
#define Integral_Url_1 [NSString stringWithFormat:@"%@/Integral/List",DefaultLk]
//个人中心
#define Center_Url_1 [NSString stringWithFormat:@"%@/Member/PersonalCenter",DefaultLk]
//商品详情 + id
#define GoodsDetail_Url_1 [NSString stringWithFormat:@"%@/Product/Detail",DefaultLk]
//收货地址
#define RecAddress_Url_1 [NSString stringWithFormat:@"%@/Order/AddressList",DefaultLk]
//积分抽奖
#define ScroeGet_Url_1 [NSString stringWithFormat:@"%@/Lottery/Index",DefaultLk]
//公司介绍
#define CompanyIntroduce_Url_1 [NSString stringWithFormat:@"%@/Home/GGCIndex",DefaultLk]
//登录
#define Login_Url_1 [NSString stringWithFormat:@"%@/DoLogin",BaseAPP_URL]
//添加购物车
#define Add_Cart_1 [NSString stringWithFormat:@"%@/AddShoppingCart",BaseAPP_URL]

//模拟登陆的 *********************************
//购物车
#define CarList_Url_2 [NSString stringWithFormat:@"%@/Home/Jump?Tag1=%@&Tag2=%@&ReturnUrl=/Product/ShopCartList",DefaultLk,TestTag1,TestTag2]

//积分
#define Integral_Url_2 [NSString stringWithFormat:@"%@/Home/Jump?Tag1=%@&Tag2=%@&ReturnUrl=/Integral/List",DefaultLk,TestTag1,TestTag2]

//个人中心
#define Center_Url_2 [NSString stringWithFormat:@"%@/Home/Jump?Tag1=%@&Tag2=%@&ReturnUrl=/Member/PersonalCenter",DefaultLk,TestTag1,TestTag2]

//商品详情 + id
#define GoodsDetail_Url_2 [NSString stringWithFormat:@"%@/Home/Jump?Tag1=%@&Tag2=%@&ReturnUrl=/Product/Detail",DefaultLk,TestTag1,TestTag2]
//收货地址
#define RecAddress_Url_2 [NSString stringWithFormat:@"%@/Home/Jump?Tag1=%@&Tag2=%@&ReturnUrl=/Order/AddressList",DefaultLk,TestTag1,TestTag2]
//积分抽奖
#define ScroeGet_Url_2 [NSString stringWithFormat:@"%@/Home/Jump?Tag1=%@&Tag2=%@&ReturnUrl=/Lottery/Index",DefaultLk,TestTag1,TestTag2]
//公司介绍
#define CompanyIntroduce_Url_2 [NSString stringWithFormat:@"%@/Home/Jump?Tag1=%@&Tag2=%@&ReturnUrl=/Home/GGCIndex",DefaultLk,TestTag1,TestTag2]
 


@interface CGUrlManage : NSObject


/**
 版本检查

 @return url
 */
+ (NSString *)getCheckVersionUrl;

/**
 图片上传
 
 @return url
 */
+ (NSString *)updateRefundImages;

//杀掉进程调用
+ (NSString *)getSetThreadKillUrl;


/// -------------- ************** 原生app部分----------
//首页
+ (NSString *)loadHoneIndex;
//品类列表
+ (NSString *)loadCateList;
//产品列表
+ (NSString *)loadProductList;
//产品详情
+ (NSString *)loadProductDetail;
//订单列表
+ (NSString *)LoadOrderList;

@end
